﻿using DataProcess.Core.Model;
using System.ComponentModel.DataAnnotations;

namespace DataProcess.Core.DataValidation
{
    public class EquipmentValidation
    {
        public static ValidationResult DataProcessingFileValidation(string value, ValidationContext vc)
        {
            if (((Equipment)vc.ObjectInstance).DataNeedProcess && string.IsNullOrEmpty(value))
            {
                return new ValidationResult("[数据处理文件]必须选择");
            }
            return ValidationResult.Success;
        }
    }
}
